ARD2  1.00 for Rev B. Hardware
Airbag Reference Demonstrator using MPC5604P
PIT.c File Reference

Periodic Interrupt Timer driver for MPC5604P. More...

#include "Compile_Options.h"
#include "derivative.h"
#include "PIT.h"

Functions

uint8_t u8fnPITConfig (const uint8_t u8Channel, const uint32_t u32InitialCount, const uint8_t u8UseISR)
 Configures a particular PIT channel for immediate operation.
void vfnPITStart (const uint8_t u8Channel, const uint8_t u8Enable)
 Starts or stops the timer for a particular PIT channel.
uint8_t u8fnPITWaitByPoll (const uint8_t u8Channel, const uint8_t u8Restart)
 Waits for a PIT channel to expire in RUN mode.

Detailed Description

Periodic Interrupt Timer driver for MPC5604P.

Copyright (c) 2011 Freescale Semiconductor Freescale Confidential Proprietary

Author:
Freescale Semiconductor
SASD Automotive
R11515
Version:
Date:
Warning:
(If needed)

History:


Function Documentation

uint8_t u8fnPITConfig ( const uint8_t  u8Channel,
const uint32_t  u32InitialCount,
const uint8_t  u8UseISR 
)

Configures a particular PIT channel for immediate operation.

Parameters:
u8Channel,:PIT channel number (0 - 3 for Pictus)
u32InitialCount,:Number of cycles to count before flagging
u8UseISR,:Switch to allow for interrupts or not
Returns:
CLEAR if all went ok; PIT_INVALID_CH if the passed channel doesn't exist in HW
uint8_t u8fnPITWaitByPoll ( const uint8_t  u8Channel,
const uint8_t  u8Restart 
)

Waits for a PIT channel to expire in RUN mode.

Parameters:
u8Channel,:PIT channel number (0 - 3 for Pictus)
u8Restart,:If non-zero, the PIT timer will be restart immediately
Returns:
Zero when PIT counted down correctly, PIT_ERROR_TIMED_OUT otherwise.
void vfnPITStart ( const uint8_t  u8Channel,
const uint8_t  u8Enable 
)

Starts or stops the timer for a particular PIT channel.

Parameters:
u8Channel,:PIT channel number (0 - 3 for Pictus)
u8Enable,:If non-zero, the timer will start, if zero it will stop
Returns:
Void.